package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusAcquisitionCardChannelMapper;
import com.ruoyi.business.domain.BusAcquisitionCardChannel;
import com.ruoyi.business.service.IBusAcquisitionCardChannelService;

/**
 * 采集卡通道Service业务层处理
 * 
 * @author asher
 * @date 2021-11-03
 */
@Service
public class BusAcquisitionCardChannelServiceImpl implements IBusAcquisitionCardChannelService 
{
    @Autowired
    private BusAcquisitionCardChannelMapper busAcquisitionCardChannelMapper;

    /**
     * 查询采集卡通道
     * 
     * @param channelId 采集卡通道主键
     * @return 采集卡通道
     */
    @Override
    public BusAcquisitionCardChannel selectBusAcquisitionCardChannelByChannelId(Long channelId)
    {
        return busAcquisitionCardChannelMapper.selectBusAcquisitionCardChannelByChannelId(channelId);
    }

    /**
     * 查询采集卡通道列表
     * 
     * @param busAcquisitionCardChannel 采集卡通道
     * @return 采集卡通道
     */
    @Override
    public List<BusAcquisitionCardChannel> selectBusAcquisitionCardChannelList(BusAcquisitionCardChannel busAcquisitionCardChannel)
    {
        return busAcquisitionCardChannelMapper.selectBusAcquisitionCardChannelList(busAcquisitionCardChannel);
    }

    /**
     * 新增采集卡通道
     * 
     * @param busAcquisitionCardChannel 采集卡通道
     * @return 结果
     */
    @Override
    public int insertBusAcquisitionCardChannel(BusAcquisitionCardChannel busAcquisitionCardChannel)
    {
        busAcquisitionCardChannel.setCreateTime(DateUtils.getNowDate());
        return busAcquisitionCardChannelMapper.insertBusAcquisitionCardChannel(busAcquisitionCardChannel);
    }

    /**
     * 修改采集卡通道
     * 
     * @param busAcquisitionCardChannel 采集卡通道
     * @return 结果
     */
    @Override
    public int updateBusAcquisitionCardChannel(BusAcquisitionCardChannel busAcquisitionCardChannel)
    {
        busAcquisitionCardChannel.setUpdateTime(DateUtils.getNowDate());
        return busAcquisitionCardChannelMapper.updateBusAcquisitionCardChannel(busAcquisitionCardChannel);
    }

    /**
     * 批量删除采集卡通道
     * 
     * @param channelIds 需要删除的采集卡通道主键
     * @return 结果
     */
    @Override
    public int deleteBusAcquisitionCardChannelByChannelIds(Long[] channelIds)
    {
        return busAcquisitionCardChannelMapper.deleteBusAcquisitionCardChannelByChannelIds(channelIds);
    }

    /**
     * 删除采集卡通道信息
     * 
     * @param channelId 采集卡通道主键
     * @return 结果
     */
    @Override
    public int deleteBusAcquisitionCardChannelByChannelId(Long channelId)
    {
        return busAcquisitionCardChannelMapper.deleteBusAcquisitionCardChannelByChannelId(channelId);
    }

    @Override
    public int insertBusAcquisitionCardChannelBatch(List<BusAcquisitionCardChannel> busAcquisitionCardChannels) {
        return busAcquisitionCardChannelMapper.insertBusAcquisitionCardChannelBatch(busAcquisitionCardChannels);
    }

    @Override
    public int deleteBusAcquisitionCardChannelByCardId(Long cardId) {
        return busAcquisitionCardChannelMapper.deleteBusAcquisitionCardChannelByCardId(cardId);
    }
}
